package com.xuecheng.learning.agent;

import com.xuecheng.api.search.model.dto.CoursePubIndexDTO;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Feign远程调用
 */
@FeignClient(value = XcFeignServiceNameList.XC_SEARCH_SERVICE)
public interface SearchApiAgent {

    /**
     * 根据Id获得课程发布信息--远程调用
     *
     * @param coursePubId
     * @return
     */
    @GetMapping("search/l/course-index/{coursePubId}")
    RestResponse<CoursePubIndexDTO> getCoursePubIndexById4s(@PathVariable Long coursePubId);

}
